-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(action): allow main ref when krew release bot action is triggered #80
Conversation
Signed-off-by: Rajat Jindal <[email protected]>
Signed-off-by: Rajat Jindal <[email protected]>
Signed-off-by: Rajat Jindal <[email protected]>
Signed-off-by: Rajat Jindal <[email protected]>
I understand this PR enables krew-release-bot to skip pre-releases, am I right? For reference, currently, we are skipping the latest tag in the workflows, but glad to see the krew-release-bot can do it by default. steps:
- name: get latest tag
id: get-latest-tag
run: |
export LATEST_TAG=`gh api repos/karmada-io/karmada/releases/latest | jq -r '.tag_name'`
echo "Got the latest tag:$LATEST_TAG"
echo "event.tag:"${{ github.event.release.tag_name }}
echo "latestTag=$LATEST_TAG" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
if: steps.get-latest-tag.outputs.latestTag == github.event.release.tag_name
- name: Update new version in krew-index
if: steps.get-latest-tag.outputs.latestTag == github.event.release.tag_name
uses: rajatjindal/[email protected] |
My understanding is that the krew-release-bot used to skip the pre-releases always (see this from before this PR) What I've fixed is that I moved the pre-release check to cicd.Provider interface. Earlier that check was outside cicd provider interface, so it would have failed if someone tried to run it from other providers workflow. As part of this PR what I've also changed is to check if the release was triggered as part of push to main branch and no explicit tag is provided, then the bot check if the current commit for which this was triggered has a release associated with it, then it uses the tag from that release. I hope that makes sense, pls feel free to reach out if you see any issues/concerns with that. |
Thanks for the clarification. It makes sense to me. What I'm asking is if there is a plan to skip the non-latest release. PS: |
ah, it took me a second to realize what you mean by latest release here. skipping if it is not latest makes sense to me. could you please open an issue for it, I will think a bit more about it and update on that issue accordingly. thanks for using the bot. |
You can refer to this issue: #75 |
one easy fix could be to trigger the github action only if it matches a specific regex. it will be a manual process, but is a straight forward workaround. (in either case i will think a bit about it) |
fixes #79